// **************************************************************
// Com ++ Framework by the C++ World
// Please report defects: mailto:compp@cplusplusworld.com
// Please visit: http://www.cplusplusworld.com/socketlibrary.html
// **************************************************************

#include <iostream>
#include <cstdlib>
#include <string>
#include "ComPlusPlus/ComPlusPlus"

class TestServerClass : public compp::ASrv {

public:
  TestServerClass (const std::string & IPAddr, const int p):  compp::ASrv (IPAddr,p) {
  }

  std::string executeTransaction (  const std::string & request, compp::ASrvContext & Context ) { 
    std::string ret = "This is the result of our server processing.";
    return ret;
  }
};

int main (int argc, char *argv [] ) {

  try {
    TestServerClass S ( "0.0.0.0", 5678 ) ;

    S.commenceWork();
    
  } catch ( syspp::ComException & e ) {
    std::cout << "Exception " << e.what () << "\n";
  }
  return 0;	
}
